import Vue from 'vue'
import Router from 'vue-router'
import Recommend from 'components/recommend/recommend'
import Singer from 'components/singer/singer'
import Search from 'components/search/search'
import Rank from 'components/rank/rank'
import SingerDetail from 'components/singerDetail/singer-detail'
import SongSheet from 'components/songSheet/songSheet'
import RankDetail from 'components/rankDetail/rankDetail'
Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'index',
    redirect: '/recommend'
  },
  {
    path: '/recommend',
    component: Recommend,
    children: [{
      path: ':id',
      component: SongSheet
    }]
  },
  {
    path: '/singer',
    component: Singer,
    children: [{
      path: ':id',
      component: SingerDetail,
      name: 'SingerDetail'
    }]
  },
  {
    path: '/search',
    component: Search
  },
  {
    path: '/rank',
    component: Rank,
    children: [{
      path: ':id',
      component: RankDetail
    }]
  }
  ]
})
